import { IsNotExistsRule } from '@/auth/rules/is-not-exisis.rule';
import { IsNotEmpty, IsEmail, IsBoolean } from 'class-validator';
export class CreateChangeuserDto {
  @IsNotEmpty({ message: '输入名字不能为空' })
  name: string;
  @IsEmail({}, { message: '输入的邮箱不符合规则' })
  @IsNotEmpty({ message: '输入邮箱号不能为空' })
  @IsNotExistsRule('user', {
    message: '该邮箱已经被占用了,请重新输入一个邮箱号',
  })
  email: string;
  @IsNotEmpty({ message: '输入性别不能为空' })
  @IsBoolean({ message: '输入性别类型需要是布尔类型' })
  gender: boolean;
}
